Learning Algorithm Design and Beyond Worst-Case Analysis